{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
 <style>
		@media only screen and (max-width: 760px),(min-device-width: 768px) and (max-device-width:1024px)  {
		#mytable, #mytable thead, #mytable tbody, #mytable th, #mytable td, #mytable tr { 
			display: block; 
		}
		#mytable thead tr { 
			position: absolute;
			top: -9999px;
			left: -9999px;
		}
		#mytable td { 
			border: none;
			border-bottom: 1px solid #eee; 
			position: relative;
			padding-left:44% !important; 
			padding-top:10px ;
		}
	    #mytable tr{ margin-bottom:20px;}
		#mytable td:before { 
			position: absolute;
			top:10px;
			left:8px;
			width: 45%; 
			padding-right:10px;
			white-space: nowrap;
		}
		    #mytable td:nth-of-type(1):before { content: "学号"; }
			#mytable td:nth-of-type(2):before { content: "姓名"; }
			#mytable td:nth-of-type(3):before { content: "行为类别"; }
			#mytable td:nth-of-type(4):before { content: "行为项目"; }
			#mytable td:nth-of-type(5):before { content: "学分"; }
			#mytable td:nth-of-type(6):before { content: "日期"; }
			#mytable td:nth-of-type(7):before { content: "操作"; }
        }		
	</style>
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form action="" method="get" name="myform">
                <div class="box-header with-border">
                    <span class="fa fa-search" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">学生行为列表查询</p>
                </div>
				<div class="box-body">
                        <div class="col-md-3 form-group">
						  <label for="inputPassword3" class="col-sm-4 control-label" style="padding-right:0; padding-left:0; font-weight:500;">
							   行为类别：
						  </label>
						  <div class="input-group col-md-8 col-xs-12">
							  <select class="form-control" name="award_type">
								  <option value="">全部</option>
                                  <option value="2" {%if $award_type=='2'%}selected{%/if%}> 违规行为</option>
                                  <option value="1" {%if $award_type=='1'%}selected{%/if%}> 奖励行为</option>
                              </select> 
						  </div> 
				       </div>
					  <div class="col-md-3 form-group">
						  <label for="inputPassword3" class="col-sm-4 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500;">
							   姓名：
						  </label>
						  <div class="input-group col-md-8 col-xs-12">
							    <input type="text" class="form-control" name="student_name" value="{%$student_name%}">
						  </div> 
				    </div>
					<div class="col-md-5 col-xs-12 form-group">
						  <label for="inputPassword3" class="col-sm-2 control-label" style="padding-right:0; padding-left:0; font-weight:500; ">
							   日期：
						  </label>
						  <div class="input-group col-sm-4" style="float:left;">
							   <input type="text" class="form-control" value="{%$from%}" id="from" name="from">
							     <div class="input-group-addon" style="padding:6px 7px;">
									<i class="fa fa-calendar"></i>
								 </div>
						  </div>
						  <span style="float:left;">  ~  </span >
						  <div class="input-group col-sm-4" style="float:left;">
							   <input type="text" class="form-control" value="{%$to%}" id="to" name="to">
							      <div class="input-group-addon" style="padding:6px 7px;">
									 <i class="fa fa-calendar"></i>
								 </div>
						  </div>						  
				    </div>
					<div class="col-md-1 col-xs-12">
					   <input type="hidden" name="a"  value="award.studentinquirelist">
					   <button type="submit" class="btn btn-warning">查 询</button>
					</div>
                   <div class="box-body">
                        <table class="table table-bordered table-striped" id="mytable">
                                <thead>
                                    <tr style="background-color:#6168fe;">
                                        <td>学号</td>
                                        <td>姓名</td>
										<td>行为类别</td>
										<td>行为项目</td>
                                        <td>学分</td>
                                        <td>日期</td>
                                        
                                    </tr>	
                                </thead>
                                <tbody>
								{%foreach from=$stu_lists key=key item=value%}
                                    <tr>
										<td>{%$value.student_no%}</td>
									    <td>{%$value.student_name%}</td>
                                        <td>{%$value.award_type%}</td>
										<td>{%$value.award_title%}</td>
										<td>{%$value.award_credit%}</td>                           
                                        <td>{%$value.create_time%}</td>
                                        
                                    </tr>	
								{%/foreach%}
                            </tbody>
                        </table>                     
				   </div><!--box-body -->
               </form>
			   {%$page%}
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
<script>
  $(function() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
  </script>
